#include <libc.h>
#include <string.h>
#include <stats.h>
#include <acces_modes.h>

int __attribute__ ((__section__(".text.main")))
  main(void)
  {
        //runjp();

        if (fork() == 0)
        {
          const int n = 5;
          int fd;        
          char buffer[n];      
        
         // if ((fd = open("DISPLAY",O_RDONLY)<0)) perror();
          while(1)
          {
            read(0,&buffer,n);
            //perror();
            write(1,&buffer,n);
          }
        }
        while (1);
        /*int size = 20;
        int i,p,fd;
        char buffer[size];
        p=fork();
        if (p!= 0) while (1);
        read(0,&buffer,size);
        //fd = dup(1);
        //close(fd);
        //write(fd,&buffer,size);
        write(1,&buffer,size);
        //perror();
        while (1);*/
        
  }
